#pragma once
#include <iostream>
#include <stdlib.h>
#include <assert.h>
using namespace std;

class Stack
{
public:
	void Init(int defaultcapacity = 4);
	void Destroy();
	void Push(int x);
	void Pop();
	int Top();
	bool Empty();
	int Size();
	void PrintStack();

private:
	int* a;
	int top;
	int capacity;
};